<!DOCTYPE html>
<html debug="true">
  <head>
    <script type="text/javascript" src="../../../../lib/externals/openlayers/lib/OpenLayers.js"></script>
    <script type="text/javascript" src="../../../../lib/externals/ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../../../lib/externals/ext/ext-all-debug.js"></script>

    <script type="text/javascript" src="../../GEOR_util.js"></script>
    <script type="text/javascript">
    function test_GetUrlPath(t) {
        t.plan(3);

        var url, path, i = GEOR.util;

        url = "http://foo.bar/extractorapp/foo/bar";
        path = i.getAppRelativePath(url);
        t.eq(path, "foo/bar",
             "getAppRelativePath returns expected value (" + url + ")");

        url = "http://foo.bar:8080/extractorapp/foo/bar";
        path = i.getAppRelativePath(url);
        t.eq(path, "foo/bar",
             "getAppRelativePath returns expected value (" + url + ")");

        url = "http://foo.bar:8080/extractorapp/foo/bar/";
        path = i.getAppRelativePath(url);
        t.eq(path, "foo/bar/",
             "getAppRelativePath returns expected value (" + url + ")");
     }

    </script>
  </head>

  <body>
    <div class="sample" id="sample_id">some text</div>
  </body>
</html>
